package com.ruoyi.purchaseReturn.mapper;

import com.ruoyi.procurement.domain.ProcurementModel;
import com.ruoyi.procurement.domain.ProcurementOrder;
import com.ruoyi.product.domain.Product;
import com.ruoyi.purchaseReturn.domain.PurchaseReturnModel;
import com.ruoyi.purchaseReturn.domain.PurchaseReturnOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author WangChangShuo
 * @date 2022年06月15日 11:24
 */
@Mapper
public interface PurchaseReturnMapper {
    int updatePurchaseReturnModel(PurchaseReturnModel purchaseReturnModel);

    List<PurchaseReturnOrder> selectPurchaseReturnOrder(PurchaseReturnOrder purchaseReturnOrder);

    List<ProcurementOrder> selectProcurementOrderListByReturn(ProcurementOrder procurementOrder);

    List<ProcurementModel> selectProcurementModelById(HashMap hashMap);

    ProcurementModel selectProcurementModels(HashMap<Object, Object> hashMap);

    ProcurementOrder selectProcurementOrderById(Long procurementWarehousingId);

    int insertPurchaseReturnOrder(PurchaseReturnOrder purchaseReturnOrder);

    int insertPurchaseReturnModel(PurchaseReturnOrder purchaseReturnOrder);

    int updatePurchaseIsReturn(Long purchaseId);

    PurchaseReturnOrder selectPurchaseReturnById(Long purchaseReturnId);

    int updatePurchaseReturn(PurchaseReturnOrder purchaseReturnOrder);

    ProcurementModel selectProcurementModelByNo(Long procurementWarehousingNo);

    List<ProcurementModel> selectProcurementModelListByNo(Long procurementWarehousingNo);

    int deletePurchaseReturnOrder(Long purchaseReturnId);

    int deletePurchaseReturnModel(Long purchaseReturnId);

    int updatePurchaseIsReturnZero(Long procurementWarehousingId);

    int updatePurchaseReturnStatus(HashMap hashMap);

    PurchaseReturnModel selectPurchaseReturnModelById(Long purchaseReturnModelId);

    List<PurchaseReturnOrder> selectPurchaseReturnOrderListCustObj(Long companyId);

    List<PurchaseReturnModel> selectPurchaseReturnModel(Long purchaseReturnModelId);

    List<Product> selectPurchaseReturnModelByNo(Long purchaseReturnId);

    List<PurchaseReturnOrder> selectProcurementSupplierObj(Long companyId);

    Long querypreviousId(Map<String, Object> params);
    Long queryNextId(Map<String, Object> params);

    List<Map<String, Object>> pendingReview(@Param("deptID") Long deptID);
}
